import requests
from bs4 import BeautifulSoup


# 分析每个分类
def analyze(url):
    res = requests.get(url)
    html = res.text
    # 解析
    soup = BeautifulSoup(html, 'html.parser')
    totalcontent = soup.select('.total-tip')[0]
    total = totalcontent.select('span')[0].text
    # print('             在售商品总数:' + total)
    return total
